package com.sans.oop;

import org.junit.Test;

/**
 * @author Sans
 */
public class OverrideTest {
    static class fu {
        public A methodA() {
            return new A();
        }
    }

    static class zi extends fu {
        @Override
        public B methodA() {
            return new B();
        }
    }

    /**
     * A 大 B 小
     */
    static class A {
    }

    static class B extends A {
    }

    @Test
    public void methodA() {
        System.out.println(new zi().methodA());
    }
}
